package cn.stylefeng.guns.modular.course.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author typ
 * @since 2021-04-13
 */
@TableName("yy_course")
@Data
public class Course implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 学习人数
     */
    @TableField("people")
    private Integer people;

    @TableField("category_id")
    private Integer categoryId;

    /**
     * 详情
     */
    @TableField("content")
    private String content;
    /*
    分类父id
     */
    @TableField("category_pid")
    private Integer categoryPid;

    /**
     * 简介
     */
    @TableField("intro")
    private String intro;

    @TableField("teacher_name")
    private String teacherName;

      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

      @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

      @TableField(value = "create_user", fill = FieldFill.INSERT)
    private Long createUser;

      @TableField(value = "update_user", fill = FieldFill.UPDATE)
    private Long updateUser;

    @TableField("cover")
    private String cover;

    @TableField("is_hot")
    private Integer isHot;
  //排序
    @TableField("sort")
    private Integer sort;

    /**
     * 学习人数（真）
     */
    @TableField("people_real")
    private Integer peopleReal;

    /**
     * 访问倍数
     */
    @TableField("multi")
    private Integer multi;

    /**
     * 购买价
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 原价
     */
    @TableField("org_price")
    private BigDecimal orgPrice;


    /**
     * 分类名称
     */
    @TableField(exist = false)
    private String categoryName;


    @TableField(exist = false)
    private String categoryParentName;

    @Override
    public String toString() {
        return "Course{" +
        "id=" + id +
        ", name=" + name +
        ", people=" + people +
        ", categoryId=" + categoryId +
        ", content=" + content +
        ", intro=" + intro +
        ", teacherName=" + teacherName +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", createUser=" + createUser +
        ", updateUser=" + updateUser +
        ", cover=" + cover +
        ", isHot=" + isHot +
        ", peopleReal=" + peopleReal +
        ", multi=" + multi +
        ", price=" + price +
        ", orgPrice=" + orgPrice +
        "}";
    }
}
